.class public Lcom/waiqin365/base/login/dk;
.super Landroid/widget/BaseAdapter;


# instance fields
.field final synthetic a:Lcom/waiqin365/base/login/LoginSubMenuActivity;

.field private b:Landroid/content/Context;


# direct methods
.method public constructor <init>(Lcom/waiqin365/base/login/LoginSubMenuActivity;Landroid/content/Context;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/base/login/dk;->a:Lcom/waiqin365/base/login/LoginSubMenuActivity;

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    iput-object p2, p0, Lcom/waiqin365/base/login/dk;->b:Landroid/content/Context;

    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/login/dk;->a:Lcom/waiqin365/base/login/LoginSubMenuActivity;

    invoke-static {v0}, Lcom/waiqin365/base/login/LoginSubMenuActivity;->a(Lcom/waiqin365/base/login/LoginSubMenuActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/login/dk;->a:Lcom/waiqin365/base/login/LoginSubMenuActivity;

    invoke-static {v0}, Lcom/waiqin365/base/login/LoginSubMenuActivity;->a(Lcom/waiqin365/base/login/LoginSubMenuActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    add-int/lit8 v0, v0, -0x1

    if-le p1, v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return-object v0

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/base/login/dk;->a:Lcom/waiqin365/base/login/LoginSubMenuActivity;

    invoke-static {v0}, Lcom/waiqin365/base/login/LoginSubMenuActivity;->a(Lcom/waiqin365/base/login/LoginSubMenuActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    goto :goto_0
.end method

.method public getItemId(I)J
    .locals 2

    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 4

    const/4 v3, 0x0

    if-nez p2, :cond_2

    new-instance v1, Lcom/waiqin365/base/login/dl;

    iget-object v0, p0, Lcom/waiqin365/base/login/dk;->a:Lcom/waiqin365/base/login/LoginSubMenuActivity;

    invoke-direct {v1, v0, v3}, Lcom/waiqin365/base/login/dl;-><init>(Lcom/waiqin365/base/login/LoginSubMenuActivity;Lcom/waiqin365/base/login/dj;)V

    iget-object v0, p0, Lcom/waiqin365/base/login/dk;->b:Landroid/content/Context;

    invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v2, 0x7f030245

    invoke-virtual {v0, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    const v0, 0x7f0c0b87

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/base/login/dl;->a:Landroid/widget/ImageView;

    const v0, 0x7f0c0b88

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/base/login/dl;->b:Landroid/widget/TextView;

    invoke-virtual {p2, v1}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/base/login/dk;->a:Lcom/waiqin365/base/login/LoginSubMenuActivity;

    invoke-static {v0}, Lcom/waiqin365/base/login/LoginSubMenuActivity;->a(Lcom/waiqin365/base/login/LoginSubMenuActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-ge p1, v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/base/login/dk;->a:Lcom/waiqin365/base/login/LoginSubMenuActivity;

    invoke-static {v0}, Lcom/waiqin365/base/login/LoginSubMenuActivity;->a(Lcom/waiqin365/base/login/LoginSubMenuActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/login/c/g;

    if-eqz v1, :cond_1

    iget-object v2, v1, Lcom/waiqin365/base/login/dl;->a:Landroid/widget/ImageView;

    if-eqz v2, :cond_0

    new-instance v2, Ljava/lang/StringBuffer;

    invoke-direct {v2}, Ljava/lang/StringBuffer;-><init>()V

    invoke-static {}, Lcom/fiberhome/gaea/client/c/b;->b()Lcom/fiberhome/gaea/client/c/b;

    move-result-object v3

    invoke-virtual {v3}, Lcom/fiberhome/gaea/client/c/b;->g()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v2

    const-string/jumbo v3, "apps"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v2

    const-string/jumbo v3, "/"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v2

    invoke-static {}, Lcom/fiberhome/gaea/client/c/b;->b()Lcom/fiberhome/gaea/client/c/b;

    move-result-object v3

    iget-object v3, v3, Lcom/fiberhome/gaea/client/c/b;->e:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v2

    const-string/jumbo v3, "/image/"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v2

    iget-object v3, v0, Lcom/waiqin365/base/login/c/g;->d:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v2

    if-eqz v2, :cond_3

    iget-object v3, v1, Lcom/waiqin365/base/login/dl;->a:Landroid/widget/ImageView;

    invoke-virtual {v3, v2}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    :cond_0
    :goto_1
    iget-object v2, v1, Lcom/waiqin365/base/login/dl;->b:Landroid/widget/TextView;

    if-eqz v2, :cond_4

    iget-object v2, v0, Lcom/waiqin365/base/login/c/g;->b:Ljava/lang/String;

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_4

    iget-object v0, v0, Lcom/waiqin365/base/login/c/g;->b:Ljava/lang/String;

    iget-object v2, v1, Lcom/waiqin365/base/login/dl;->b:Landroid/widget/TextView;

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, v1, Lcom/waiqin365/base/login/dl;->a:Landroid/widget/ImageView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    :cond_1
    :goto_2
    return-object p2

    :cond_2
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/login/dl;

    move-object v1, v0

    goto/16 :goto_0

    :cond_3
    iget-object v2, v1, Lcom/waiqin365/base/login/dl;->a:Landroid/widget/ImageView;

    const v3, 0x7f0200ee

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setImageResource(I)V

    goto :goto_1

    :cond_4
    iget-object v0, v1, Lcom/waiqin365/base/login/dl;->b:Landroid/widget/TextView;

    const-string/jumbo v2, ""

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, v1, Lcom/waiqin365/base/login/dl;->a:Landroid/widget/ImageView;

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_2
.end method
